package com.text.day2_2;

public class Circle extends TuXing{
    private double r;

    @Override
    public void zc() {
//        super.zc();          可用可不用
        double zc = 2 * 3.14 * r;
        System.out.println("周长：" + zc);
    }

    @Override
    public void area() {
        super.area();
        double mian = 3.14 * r * r;
        System.out.println("面积：" + mian);
    }

    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }
}
